import { uniFetch } from "@/pages/api/http.js";

export const getMalfunctionRepairList = (params) => {
  return uniFetch({
    url: "/blade-repair/repairApply/list",
    method: "GET",
    data: params,
  });
};

export const saveMalfunctionRepair = (params) => {
  return uniFetch({
    url: "/blade-repair/repairApply/save",
    method: "POST",
    data: params,
  });
};

export const getMalfunctionRepairDetail = (params) => {
  return uniFetch({
    url: "/blade-repair/repairApply/detail",
    method: "GET",
    data: params,
  });
};

// 审核信息
export const getMalfunctionRepairApproval = (params) => {
  return uniFetch({
    url: "/blade-repair/repairApproval/business",
    method: "GET",
    data: params,
  });
};

// 维修信息
export const getMalfunctionRepairOrder = (params) => {
  return uniFetch({
    url: "/blade-repair/repairOrder/detail",
    method: "GET",
    data: params,
  });
};
// 工作量
export const getMalfunctionRepairWorkload = (params) => {
  return uniFetch({
    url: "/blade-repair/repairOrder/detail",
    method: "GET",
    data: params,
  });
};

// 撤回申请
export const cancelMalfunctionRepair = (params) => {
  return uniFetch({
    url: "/blade-repair/repairApply/cancel?applyId=" + params,
    method: "POST",
  });
};
